//
//  OPHelperView.m
//  OnePiece
//
//  Created by wsy on 15/11/2.
//  Copyright © 2015年 wsy. All rights reserved.
//

#import "OPHelperView.h"

@implementation OPHelperView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if(self)
    {
        _headView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT*2/5)];
        _headView.image = [UIImage imageNamed:@"helperhedimg"];
        [self addSubview:_headView];
        _accountBT = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _accountBT.frame = CGRectMake(0, SCREEN_HEIGHT-49, SCREEN_WIDTH/2, SCREEN_HEIGHT*1.5/5-24);
        [_accountBT setImage:[UIImage imageNamed:@"iconfont-jizhangben"] forState:(UIControlStateNormal)];
        [_accountBT setTitle:@"记账" forState:(UIControlStateNormal)];
        _accountBT.backgroundColor = [UIColor colorWithRed:0.922 green:0.729 blue:0.000 alpha:1.000];
        [self addSubview:_accountBT];
        _exchangeBT = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _exchangeBT.frame = CGRectMake(SCREEN_WIDTH/2, SCREEN_HEIGHT-49, SCREEN_WIDTH/2, SCREEN_HEIGHT*1.5/5-24);
        [_exchangeBT setImage:[UIImage imageNamed:@"iconfont-huilvhuansuan"] forState:(UIControlStateNormal)];
        [_exchangeBT setTitle:@"汇率" forState:(UIControlStateNormal)];
        _exchangeBT.backgroundColor = [UIColor colorWithRed:0.914 green:0.541 blue:0.000 alpha:1.000];
        [self addSubview:_exchangeBT];
        _weatherBT = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _weatherBT.frame = CGRectMake(0, SCREEN_HEIGHT-49, SCREEN_WIDTH/2, SCREEN_HEIGHT*1.5/5-24);
        [_weatherBT setImage:[UIImage imageNamed:@"iconfont-nongyun"] forState:(UIControlStateNormal)];
        [_weatherBT setTitle:@"天气" forState:(UIControlStateNormal)];
        _weatherBT.backgroundColor = [UIColor colorWithRed:0.851 green:0.412 blue:0.000 alpha:1.000];
        [self addSubview:_weatherBT];
        _settingBT = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _settingBT.frame = CGRectMake(SCREEN_WIDTH/2, SCREEN_HEIGHT-49, SCREEN_WIDTH/2, SCREEN_HEIGHT*1.5/5-24);
        [_settingBT setImage:[UIImage imageNamed:@"iconfont-shezhi"] forState:(UIControlStateNormal)];
        [_settingBT setTitle:@"设置" forState:(UIControlStateNormal)];
        _settingBT.backgroundColor = [UIColor colorWithRed:0.761 green:0.243 blue:0.000 alpha:1.000];
        [self addSubview:_settingBT];
    }
    return self;
}




@end
